package org.jeecg.modules.oms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;
import java.util.Date;

/**
 * 成品销售订单进度表
 */
@Data
@TableName("oms_product_sales_order_progress")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ProductSalesOrderProgress implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    /**
     * 订单ID
     */
    private String orderId;
    
    /**
     * 订单编号
     */
    @Excel(name = "订单编号", width = 15)
    @TableField(exist = false)
    private String orderNo;
    
    /**
     * 旧状态
     */
    @Excel(name = "旧状态", width = 15, dicCode = "order_status")
    @Dict(dicCode = "order_status")
    private Integer oldStatus;
    
    /**
     * 新状态
     */
    @Excel(name = "新状态", width = 15, dicCode = "order_status")
    @Dict(dicCode = "order_status")
    private Integer newStatus;
    
    /**
     * 变更时间
     */
    @Excel(name = "变更时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date changeTime;
    
    /**
     * 变更人ID
     */
    private String operatorId;
    
    /**
     * 变更人姓名
     */
    @Excel(name = "变更人", width = 15)
    @TableField(exist = false)
    private String operatorName;
    
    /**
     * 操作类型
     */
    @Excel(name = "操作类型", width = 15)
    private String operationType;
    
    /**
     * 操作内容
     */
    @Excel(name = "操作内容", width = 20)
    private String operationContent;
    
    /**
     * 变更原因
     */
    @Excel(name = "变更原因", width = 20)
    private String changeReason;
    
    /**
     * 备注
     */
    @Excel(name = "备注", width = 20)
    private String remark;
    
    /**
     * 创建人
     */
    private String createBy;
    
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    
    /**
     * 更新人
     */
    private String updateBy;
    
    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 状态（冗余字段，与newStatus相同，便于查询）
     */
    @Excel(name = "状态", width = 15, dicCode = "order_status")
    @Dict(dicCode = "order_status")
    private Integer status;

    public Integer getStatus() {
        return this.newStatus;
    }

    public void setStatus(Integer status) {
        this.status = status;
        this.newStatus = status;
    }
} 